<?php echo $header;echo $sidebar ?>
<style>
a.edit_icon {
	background: url("<?php echo $this->config->base_url(); ?>assets/admin/admin_images/icons/edit.gif") no-repeat scroll left top transparent;
	display: inline-block;
	height: 16px;
	width: 16px;
}
a.delete2_icon {
	background: url("<?php echo $this->config->base_url(); ?>assets/admin/images/icon/delete.png") no-repeat scroll left top transparent;
	display: inline-block;
	height: 16px;
	width: 16px;
}
ul.yiiPager {
	border: 0 none;
	display: inline;
	font-size: 11px;
	line-height: 100%;
	margin: 0;
	padding: 0;
}
ul.yiiPager a:link, ul.yiiPager a:visited {
	border: 1px solid #9AAFE5;
	color: #0E509E;
	font-weight: bold;
	padding: 1px 6px;
	text-decoration: none;
}
.star {
	color: red;
}
.error {
	color:#B94A66;
	font-style:italic;
}
.required {
	color:#C00;
}
</style>
<div class="span10 content"> <?php echo $hugemenu ?>
  <h1>Campaign setup</h1>
  <a href="<?php echo site_url()."email_marketing/campaigns/template/".$campaign['campaign_uid'];?>">Campaign Template>></a>
  <?php if($this->session->flashdata('message')) {?>
  <div class="alert alert-success"> <?php echo $this->session->flashdata('message') ?>  </div>
  <?php  }?>
  <div>
    <div class="tab-content"> <?php echo form_open(current_url()); ?>  <?php if($custom_error){ ?>
    <div class="alert alert-error"> <?php echo $custom_error ?>  </div>
    <?php } ?>
      <div   align="left">
      
       <br/>
     
        <table cellspacing="0" cellpadding="8" border="0"  width="50%" >
          <tbody>
            <tr>
              <td width="18%"><b>
                <label for="from_name">From Name<span class="required">*</span></label>
                </b></td>
              <td ><input id="from_name" type="text" name="from_name" value="<?php echo  $campaign['from_name']; ?>" style='width:37em;'/>
                <?php echo form_error('from_name'); ?></td>
            </tr>
            <tr>
              <td width="18%"><b>
                <label for="from_email">From Email<span class="required">*</span></label>
                </b></td>
              <td><input id="from_email" type="text" name="from_email" value="<?php echo  $campaign['from_email']; ?>" style='width:37em;' />
                <?php echo form_error('from_email'); ?></td>
            </tr>
            <tr>
              <td width="18%"><b>
                <label for="reply_to">Reply_to<span class="required">*</span></label>
                </b></td>
              <td><input id="reply_to" type="text" name="reply_to" value="<?php echo $campaign['reply_to']; ?>"  style='width:37em;'/>
                <?php echo form_error('reply_to'); ?></td>
            </tr>
            <tr>
              <td width="18%"><b>
                <label for="to_name">To_name<span class="required">*</span></label>
                </b></td>
              <td><input id="to_name" type="text" name="to_name" value="<?php echo $campaign['to_name']; ?>"  style='width:37em;'/>
                <?php echo form_error('to_name'); ?></td>
            </tr>
            <tr>
              <td width="18%"><b>
                <label for="subject">Subject</label>
                </b></td>
              <td><input id="subject" type="text" name="subject" value="<?php echo  $campaign['subject']; ?>"  style='width:37em;'  />
                <?php echo form_error('subject'); ?></td>
            </tr>
          </tbody>
        </table>
      </div>
      <div>
        <h5>Campaign Options</h5>
        <table cellspacing="0" cellpadding="8" border="0"  width="50%" >
          <tbody>
            <tr>
              <td width="18%"><label for="url_tracking">Url tracking<span class="required">*</span></label></td>
              <td><?php
                                    $enum = array('no'=>'No','yes'=>'Yes');                                                                    
                                    echo form_dropdown('url_tracking', $enum,$campaign['url_tracking']); ?>
                <?php echo form_error('url_tracking'); ?></td>
            </tr>
            <tr>
              <td><label for="json_feed">Json feed<span class="required">*</span></label></td>
              <td><?php
                                    $enum = array('no'=>'No','yes'=>'Yes');                                                                    
                                    echo form_dropdown('json_feed', $enum,$campaign['json_feed']); ?>
                <?php echo form_error('json_feed'); ?></td>
            </tr>
            <tr>
              <td><label for="xml_feed">Xml feed<span class="required">*</span></label></td>
              <td><?php
                                    $enum = array('no'=>'No','yes'=>'Yes');                                                                    
                                    echo form_dropdown('xml_feed', $enum,$campaign['xml_feed']); ?>
                <?php echo form_error('xml_feed'); ?></td>
            </tr>
            <tr>
              <td><label for="plain_text_email">Plain text email<span class="required">*</span></label></td>
              <td><?php
                                    $enum = array('no'=>'No','yes'=>'Yes');                                                                    
                                    echo form_dropdown('plain_text_email', $enum,$campaign['plain_text_email']); ?>
                <?php echo form_error('plain_text_email'); ?></td>
            </tr>
            <tr>
              <td><label for="email_stats">Email stats</label></td>
              <td><input id="email_stats" type="text" name="email_stats" value="<?php echo $campaign['email_stats'] ?>"  />
                <?php echo form_error('email_stats'); ?></td>
            </tr>
          </tbody>
        </table>
         <table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-right: 30px; margin-bottom: 10px;text-align:right">
        <tbody>
          <tr>
            <td><input type="submit" value="Save Changes" name="submit" class="btn btn-primary"></td>
          </tr>
        </tbody>
      </table>
    
      </div>
    </div>
    <?php echo form_close(); ?> </div>
</div>
</div>
<!--/content--> 
<?php echo $footer ?> 
<script>

$(document).ready( function () {		
	
    $(".collapse").collapse()({
      show: false
      });
});
</script>